import config from "./config.js"
//暴露出去一个发送请求的回调
export default (url,data = {},method = "GET")=>{
	return new Promise ((resolve,reject) => {
		uni.request({
			url:config.host + url,
			data,
			method,
			success:(res) => {
				resolve(res.data)
			},
			fail:(err)=>{
				reject(err)
			}
		})
	})
}